package com.zw.cloud.mybatis.plus.controller.stenter;


import com.zw.cloud.global.response.wrapper.entity.WebResult;
import com.zw.cloud.mybatis.plus.entity.stenter.BaseTenterCraftHistory;
import com.zw.cloud.mybatis.plus.service.api.stenter.IBaseTenterCraftHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 定型机历史工艺 前端控制器
 * </p>
 *
 * @author zw
 * @since 2023-11-14
 */
@RestController
@RequestMapping("/base-tenter-craft-history")
public class BaseTenterCraftHistoryController {
    @Autowired
    private IBaseTenterCraftHistoryService baseTenterCraftHistoryService;

    /**
     * 定型工艺历史版本查询
     */
    @GetMapping("/queryBaseTenterCraftHistoryByVersionId/{versionId}")
    public WebResult<List<BaseTenterCraftHistory>> queryBaseTenterCraftHistoryByVersionId(@PathVariable Long versionId) {
        return WebResult.success(baseTenterCraftHistoryService.queryBaseTenterCraftHistoryByVersionId(versionId));
    }
}
